package app

import ariba.ui.aribaweb.util.*;
import ariba.ui.servletadaptor.AWServletApplication;
import ariba.appcore.util.MailMonitor
import javax.mail.internet.MimeMessage

class Application extends AWServletApplication
{
    static String MAIL_FROM;
    static String MAIL_TOLIST;
    static String MAIL_HOST
    static String MAIL_PORT
    static String MAIL_SSL
    static String MAIL_USER;
    static String MAIL_PASSWORD;
    static String SHARED_DIR;

    static String HUDSON_URL

    protected void awake ()
    {
        super.awake()

        java.util.Properties props = AWUtil.loadProperties("app.properties")


        MAIL_FROM = props.get("mail.from")
        MAIL_TOLIST = props.get("mail.tolist");
        MAIL_HOST= props.get("mail.host", "smtp.gmail.com");
        MAIL_PORT= props.get("mail.port", "465");
        MAIL_SSL = props.get("mail.ssl","on");
        MAIL_USER = props.get("mail.user");
        MAIL_PASSWORD = props.get("mail.password")
        SHARED_DIR = props.get("shared.dir");

        HUDSON_URL = props.get("hudson.hostURL", "http://localhost:8080")

        println "---------- INITIALIZED -------"

    }
}